/**
 * Copyright &copy; 2015-2020 <a href="www.dsesa.cn/">ESA</a> All rights reserved.
 */
package com.jeeplus.modules.sys.security;

import com.jeeplus.modules.sys.entity.LoginType;

/**
 * 用户和密码（包含验证码）令牌类
 * @author jeeplus
 * @version 2016-5-19
 */
public class UsernamePasswordToken extends org.apache.shiro.authc.UsernamePasswordToken {

	private static final long serialVersionUID = 1L;

	private LoginType type;
	private String wxname;
	private boolean mobileLogin;
	
	public UsernamePasswordToken() {
		super();
	}

	/**
	 * 免密登录
	 */
	public UsernamePasswordToken(String username) {
		super(username, "", false, null);
		this.type = LoginType.NOPASSWD;
	}

	public UsernamePasswordToken(String username, char[] password,
			boolean rememberMe, String host, boolean mobileLogin) {
		super(username, password, rememberMe, host);
		this.mobileLogin = mobileLogin;
	}

	public String getWxname() {
		return wxname;
	}

	public void setWxname(String wxname) {
		this.wxname = wxname;
	}

	public boolean isMobileLogin() {
		return mobileLogin;
	}

	public LoginType getType() {
		return type;
	}

	public void setType(LoginType type) {
		this.type = type;
	}
}